package net.esj.basic.core.engine.classloader;

import java.net.URISyntaxException;

import org.springframework.beans.factory.BeanClassLoaderAware;

//@Service
public class ClassLoaderFactory implements BeanClassLoaderAware {

	private ClassLoader classLoader;
	
	public Class load(String name) throws ClassNotFoundException{
		return classLoader.loadClass(name);
	}
	
	@Override
	public void setBeanClassLoader(ClassLoader classLoader) {
		try {
			this.classLoader = new DyncClassLoader(classLoader, "E:/program/javaws/HibernateGeneric/");
		} catch (URISyntaxException e) {
			e.printStackTrace();
		}
	}

}
